Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

148
Visualizações
React-Bootstrap "Option was not found"

Trying to add a dropdown menu in a signup form.

import React from 'react';
import { Form, Option } from 'react-bootstrap';

function Signup() {
  return (
                <Form>
                    <Form.Group className='mb-3' controlId='firstName'>
                        <Form.Label>First Name</Form.Label>
                        <Form.Control type='firstName' placeholder='First name' required />
                    </Form.Group>
                    <Form.Group className='mb-3' controlId='lastName'>
                        <Form.Label>Last Name</Form.Label>
                        <Form.Control type='firstName' placeholder='Last name' required />
                    </Form.Group>
                    <Form.Group className='mb-3' controlId='email'>
                        <Form.Label>Email</Form.Label>
                        <Form.Control type='email' placeholder='Email address' required />
                    </Form.Group>
                    <Form.Select aria-label='TeamSelect'>
                        <Option>Select your team</Option>
                        <Option value='1'>Team One</Option>
                        <Option value='2'>Team Two</Option>
                    </Form.Select>
                </Form>
  )
}

export default Signup

If I leave it as this then I get an error

ERROR in ./src/components/pages/Signup.js 156:43-49
export 'Option' (imported as 'Option') was not found in 'react-bootstrap/Form' (possible exports: default)

But If I leave 'Option' out of the import then I get an undefined error. What am I missing here?

EDIT 1: I installed react-bootstrap-select-dropdown and I no longer get an error that 'Option' is missing however the page doesn't load (white screen).

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

'Option' with a capital 'O' is used in React-Native but not in ReactJS. Need to use lowercase 'o' for 'option' to get dropdown to work.

          <Form.Select aria-label='TeamSelect'>
             <option>Select your team</Option>
             <option value='1'>Team One</Option>
             <option value='2'>Team Two</Option>
          </Form.Select>
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda